package whu.o2o.util;







import android.os.Environment;





public class ConstantData {

	public static final class Url {
		public static final String IP = "192.168.1.109";
		public static final int PORT = 9090;
		public static final String HEAD = "http://" + IP + ":" + PORT + "/";
		/** 获取城市列表 */
		public final static String GET_CITY_LIST = ConstantData.Url.HEAD + "getCityList.shtml?";

		/** 搜索路线 */
		public final static String SEARCH_ROUTE = ConstantData.Url.HEAD
				+ "searchDestination.shtml?from=%s&searchKey=%s&page=";

		/** 根据条件筛选路线 */
		public final static String GET_ROUTE = ConstantData.Url.HEAD
				+ "getRoute.shtml?from=%s&sort=%d&destination=%s&lowerPrice=%d&higherPrice=%d&days=%d&page=";

		/** 获取路线详情 */
		public final static String GET_ROUTE_DETAIL = ConstantData.Url.HEAD + "getRouteDetails.shtml?routeId=%d";

		/** 目的地分组列表 */
		public final static String GET_DESTINATION_GROUP = ConstantData.Url.HEAD + "getDestinationgroupList.shtml";

		/** 目的地列表 */
		public final static String GET_DESTINATION_LIST = ConstantData.Url.HEAD + "getDestinationList.shtml?id=%d";

		/** 根据条件筛选导游 */
		public final static String GET_GUIDE = ConstantData.Url.HEAD
				+ "getGuide.shtml?from=%s&sort=%d&feature=%d&type=%d&page=%d";

		/** 高级搜索导游 */
		public final static String SENIOR_SEARCH_GUIDE = ConstantData.Url.HEAD
				+ "getSeniorGuide.shtml?from=%s&agencyId=%s&sex=%d&lowerAge=%d&higherAge=%d&page=";

		/** 搜索导游 */
		public final static String SEARCH_GUIDE = ConstantData.Url.HEAD
				+ "searchGuide.shtml?from=%s&searchKey=%s&page=";

		/** 根据条件筛选达人 */
		public final static String GET_MASTER = ConstantData.Url.HEAD
				+ "getGuide_v1.shtml?from=%s&sort=%d&lowerAge=%d&higherAge=%d&type=%d&page=%d";

		/** 搜索达人 */
		public final static String SEARCH_MASTER = ConstantData.Url.HEAD + "";

		/** 获取导游产品 */
		public final static String GET_GUIDE_ROUTE = ConstantData.Url.HEAD + "getGuideRoute.shtml?guideId=%d";

		/** 获取导游日记 */
		public final static String GET_GUIDE_DIARY = ConstantData.Url.HEAD + "getGuideDiary.shtml?guideId=%d";

		/** 获取用户名片 */
		public final static String GET_USER_CARD = ConstantData.Url.HEAD + "yonghuxinxi.shtml?cardid=%d&userid=%d";

		/** 获取验证码 */
		public final static String GET_VALIDATE_CODE = ConstantData.Url.HEAD + "regedit_iphone_v1.shtml?cornet=%s";

		/** 提交注册 */
		public final static String REGISTER = ConstantData.Url.HEAD + "registration.shtml?";
		
		/** 提交登录 */
		public final static String LOGIN = ConstantData.Url.HEAD + "userlogin.shtml?mobile=%s&password=%s&tpye=%d";

		/** 个人中心：我的导游 */
		public final static String MY_GUIDE = ConstantData.Url.HEAD + "getKnowGuideList.shtml?userid=%d";
		
		/** 发送录音 */
		public final static String SEND_RECORD = ConstantData.Url.HEAD + "sendSpeex.shtml";
		
		/** 下载录音 */
		public final static String DOWNLOAD_RECORD = ConstantData.Url.HEAD + "audio/%s";
		
		/** 下载图片 */
		public final static String DOWNLOAD_IMAGE = ConstantData.Url.HEAD + "%s";
		/** ��¼ */
		public final static String GET_LOGIN = ConstantData.Url.HEAD + "userlogin.shtml?mobile=%s&password=%s&tpye=%d";
		
		/** ע�� */
		public final static String POST_REGISTER = ConstantData.Url.HEAD + "registration.shtml?";
		
		/** �޸����� */
		public final static String POST_UPDATEPASSWORD = ConstantData.Url.HEAD + "updatePassword.shtml?userId=%d&mobile=%s&code=%s&password=%s&repassword=%s";
		
		/** ��ȡ��֤��*/
		public final static String GET_CODE = ConstantData.Url.HEAD + "regedit_iphone_v1.shtml?cornet=%s";
		
		/** ��ȡ��֤��*/
		public final static String GET_STUDIO = ConstantData.Url.HEAD +"getStudio.shtml?page=%d";
		/** 我的工作室*/
		public final static String GET_MYSTUDIO = ConstantData.Url.HEAD +"getStudio.shtml?guideId=&page=%d";
		

		
		/** 搜索工作室*/
		public final static String GET_SEARCHSTUDIO = ConstantData.Url.HEAD +"getStudio.shtml?page=%d&searchKey=%s";
		/** 叫单列表全部*/
		public final static String GET_ALLCALLLIST = ConstantData.Url.HEAD +"getCallList.shtml?userId=%d";
		/** 叫单列表*/
		public final static String GET_CALLLIST = ConstantData.Url.HEAD +"getCallList.shtml?userId=%d&callType=%d";
		/** 搜索工作室*/
		public final static String GET_CALLNEW = ConstantData.Url.HEAD +"getStudio.shtml?page=%d&searchKey=%s";
		
		/** 抢单*/
		public final static String POST_QIANGDAN = ConstantData.Url.HEAD +"qiangdan.shtml?userid=%d&username=%s&cid=%d";
		
	}

	public static final class SharedPrefs {
		public static final String NAME = "info";
		public static final String CITY = "city";
		public static final String USER_TYPE = "user_type";
		public static final String USER_ID = "user_id";
		public static final String USER_NAME = "user_name";
		public static final String USER_HEAD_URL = "user_head_url";
		public static final String USER_CARD_IMAGE_URL = "user_card_image_url";
		public static final String SEARCH_ROUTE_HISTORY = "search_route_history";
		public static final String MASTER_APPLY = "master_apply";
		public static final int TYPE = 2;
		public static final String SPLASH = "splash";
	}

	public static final class Action {
		public static final String LOCATION = "location";
		public static final String CITY = "city";
		public static final String CALLBACK_UPDATE_CITY = "callbackUpdateCity";
		public static final String UPDATE_DESTINATION_LIST = "updateDestinationList";
		public static final String MASTER_APPLIED = "masterApplied";
		public static final String loginTag="com.cyht.guide.login";
	}


	public static final class Data {
		/** 数据库文件 */
		public static final String DB_PATH = "/data" + Environment.getDataDirectory().getAbsolutePath()
				+ "/com.cyht.f2f.guest/databases/";
		public static final String DB_NAME = "guest.db";
		public static final int DB_VERSION = 1;

		/** 线程池大小 */
		public static final int THREAD_POOL_MAX_SIZE = 5;

		public static final String SPLIT = "\\|";
		public static final String GET_HTTP = "get";
		public static final String POST_HTTP = "post";
		/** 网络请求超时时间 */
		public final static int GET_CONNECTION_TIMEOUT = 10 * 1000;
		public final static int GET_SO_TIMEOUT = 20 * 1000;
		public final static int POST_CONNECTION_TIMEOUT = 30 * 1000;
		public final static int POST_SO_TIMEOUT = 60 * 1000;

		public static final String DEFAULT_CITY = "武汉";
		public static final String POSITIONING = "定位中";
		public static final int PARSE_XML_MSG_CODE = 111;
		public static final int GET_HTTP_RESULT_MSG_CODE = 112;

		/** 城市列表 子项类型 */
		public static final int CITYLIST_LETTER_TYPE = 0;
		public static final int CITYLIST_CITY_TYPE = 1;

		/** 已认证 */
		public static final int VALIDATED = 1;
		/** 已关注 */
		public static final int FOCUSED = 1;
		/** 已预订 */
		public static final int RESERVED = 1;

		/** 已申请达人 */
		public static final int MASTER_APPLIED = 1;

		/** 默认导游类型：女导游 */
		public static final int WOMAN_GUIDE = 2;

		/** 性别 */
		public static final int MAN = 0;
		public static final int WOMAN = 1;

		/** 用户类型 */
		public static final int GUEST = 0;
		public static final int MASTER = 1;
		public static final int GUIDE = 2;

		/** 日记发送状态 0 已发, 1 发送中, 2 发送失败 */
		public static final int SENDED_DIARY_STATE = 0;
		public static final int SENDING_DIARY_STATE = 1;
		public static final int FAIL_DIARY_STATE = 2;

		/** 日记评论类型：0 赞, 1 评论 */
		public static final int GOOD_DIARY = 0;
		public static final int COMMENT_DIARY = 1;

		/** 日记类型：0 日记, 1 FAQ */
		public static final int DEFAULT_DIARY_TYPE = 0;
		public static final int FAQ_DIARY_TYPE = 1;

		/** 标识符：添加图片的按钮 */
		public final static String ADD_IMAGE_TAG = "default";

		/** 评论对象：0 评论产品, 1 评论导游, 2 评论达人 */
		public static final int ROUTE_COMMENT_OBJECT = 0;
		public static final int GUIDE_COMMENT_OBJECT = 1;
		public static final int MASTER_COMMENT_OBJECT = 2;

		/** 导游承接状态 0 全陪/地接 1 全陪 2 地接 */
		public static final String[] RECEPTION_TYPE = { "全陪/地接", "全陪", "地接" };
	}
}
